@import 'variables.less';

.main-layout {
  height: 100vh;
  background: #060e1b;
  
  .tech-sider {
    background: linear-gradient(to bottom, #0a1529, #071630);
    box-shadow: 0 0 15px rgba(0, 190, 255, 0.25);
    position: relative;
    overflow: hidden;
    z-index: 100;
    
    @media screen and (max-width: 768px) {
      position: fixed;
      height: 100vh;
      left: 0;
      top: 0;
      transform: translateX(-100%);
      transition: transform 0.3s ease-in-out;
      
      &.expanded {
        transform: translateX(0);
      }
    }
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: repeating-linear-gradient(
        transparent 0px,
        rgba(0, 175, 255, 0.03) 1px,
        transparent 2px
      );
      pointer-events: none;
      z-index: -1;
    }
    
    &::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 1px;
      height: 100%;
      background: linear-gradient(to bottom, transparent, rgba(0, 235, 255, 0.5), transparent);
      box-shadow: 0 0 8px rgba(0, 200, 255, 0.8);
      z-index: 10;
    }
    
    .logo {
      height: 64px;
      display: flex;
      align-items: center;
      padding: 0 24px;
      margin: 12px 0;
      position: relative;
      overflow: hidden;
      
      .logo-icon {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        background: linear-gradient(135deg, #0067ff, #00e0ff);
        color: white;
        border-radius: 8px;
        box-shadow: 0 0 15px rgba(0, 170, 255, 0.6);
        position: relative;
        z-index: 1;
        overflow: hidden;
        
        .logo-image {
          width: 24px;
          height: 24px;
          object-fit: contain;
        }
        
        &::before {
          content: '';
          position: absolute;
          inset: -1px;
          background: linear-gradient(45deg, #00a3ff, transparent, #00c8ff);
          border-radius: 9px;
          z-index: -1;
          animation: border-pulse 3s infinite linear;
        }
      }
      
      .logo-text {
        margin-left: 12px;
        font-size: 20px;
        font-weight: 600;
        background: linear-gradient(to right, #fff, #85e5ff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 0 5px rgba(0, 180, 255, 0.4);
        animation: pulse 4s infinite alternate;
      }
    }
    
    .menu-container {
      .tech-menu {
        background: transparent;
        font-size: 14px;
        
        .ant-menu-item {
          margin: 4px 16px;
          border-radius: 6px;
          color: #a3daff;
          transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
          position: relative;
          overflow: hidden;
          
          &::before {
            content: '';
            position: absolute;
            left: -20px;
            top: 50%;
            transform: translateY(-50%);
            width: 6px;
            height: 6px;
            background: #00c2ff;
            border-radius: 50%;
            box-shadow: 0 0 8px #00a2ff;
            opacity: 0;
            transition: all 0.3s;
          }
          
          &:hover {
            background: rgba(0, 140, 255, 0.1);
            color: #66cdff;
            
            &::before {
              opacity: 1;
              left: 10px;
            }
          }
          
          &.ant-menu-item-selected {
            background: linear-gradient(90deg, rgba(0, 146, 255, 0.2), rgba(0, 146, 255, 0.05));
            color: #ffffff;
            text-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
            
            &::before {
              opacity: 1;
              left: 10px;
              background: #00ffea;
              box-shadow: 0 0 10px #00ffea;
            }
            
            &::after {
              border-right: 3px solid #00e1ff;
              box-shadow: 0 0 8px rgba(0, 225, 255, 0.8);
            }
          }
        }
        
        .ant-menu-submenu {
          .ant-menu-submenu-title {
            margin: 4px 16px;
            border-radius: 6px;
            color: #a3daff;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            
            &:hover {
              background: rgba(0, 140, 255, 0.1);
              color: #66cdff;
            }
          }
          
          &.ant-menu-submenu-open {
            .ant-menu-submenu-title {
              color: #ffffff;
              text-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
            }
          }
          
          .ant-menu-sub {
            background: rgba(7, 25, 43, 0.8);
            
            .ant-menu-item {
              margin-left: 32px;
              margin-right: 16px;
            }
          }
        }
      }
    }
  }
  
  .tech-header {
    background: linear-gradient(90deg, #0a1529, #071630);
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 60, 255, 0.2);
    position: relative;
    z-index: 90;
    
    @media screen and (max-width: 1200px) {
      padding: 0 16px;
    }
    
    @media screen and (max-width: 768px) {
      padding: 0 12px;
      height: 56px;
    }
    
    &::before {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1px;
      background: linear-gradient(to right, transparent, rgba(0, 180, 255, 0.6), transparent);
    }
    
    .header-left {
      display: flex;
      align-items: center;
      
      .trigger {
        font-size: 18px;
        color: #a3daff;
        padding: 0 12px;
        cursor: pointer;
        transition: color 0.3s;
        
        &:hover {
          color: #00e1ff;
          text-shadow: 0 0 8px rgba(0, 225, 255, 0.8);
        }
      }
      
      .header-breadcrumb {
        margin-left: 16px;
        
        .ant-breadcrumb-link {
          color: rgba(163, 218, 255, 0.8);
          transition: all 0.3s;
          
          a {
            color: rgba(163, 218, 255, 0.8);
            
            &:hover {
              color: #00e1ff;
            }
          }
        }
        
        .ant-breadcrumb-separator {
          color: rgba(163, 218, 255, 0.5);
        }
      }
    }
    
    .header-search {
      flex: 0 0 320px;
      margin: 0 24px;
      display: flex;
      align-items: center;
      height: 100%;
      
      @media screen and (max-width: 1200px) {
        flex: 0 0 260px;
        margin: 0 16px;
      }
      
      @media screen and (max-width: 992px) {
        flex: 0 0 200px;
        margin: 0 12px;
      }
      
      @media screen and (max-width: 768px) {
        display: none;
      }
      
      .search-input {
        background: rgba(0, 180, 255, 0.05);
        border: 1px solid rgba(0, 180, 255, 0.2);
        border-radius: 4px;
        width: 100%;
        
        input {
          background: transparent;
          color: #a3daff;
        }
        
        .ant-input-prefix {
          color: rgba(0, 180, 255, 0.5);
        }
        
        &:hover, &.ant-input-affix-wrapper-focused {
          border-color: rgba(0, 180, 255, 0.5);
          box-shadow: 0 0 5px rgba(0, 180, 255, 0.3);
        }
      }
    }
    
    .header-right {
      display: flex;
      align-items: center;
      
      .header-action-items {
        display: flex;
        align-items: center;
        margin-right: 20px;
        
        @media screen and (max-width: 992px) {
          .system-time {
            display: none;
          }
        }
        
        @media screen and (max-width: 768px) {
          margin-right: 12px;
          
          .header-action-btn {
            padding: 0 6px;
            height: 36px;
          }
          
          .notification-badge,
          .message-badge {
            margin: 0 3px;
          }
        }
        
        @media screen and (max-width: 576px) {
          .header-action-btn:not(:first-child) {
            display: none;
          }
        }
        
        .header-action-btn {
          font-size: 16px;
          color: #a3daff;
          padding: 0 8px;
          height: 40px;
          transition: all 0.3s;
          background: transparent;
          border: none;
          display: flex;
          align-items: center;
          justify-content: center;
          
          &:hover {
            color: #00e1ff;
            text-shadow: 0 0 8px rgba(0, 225, 255, 0.7);
            background: rgba(0, 140, 255, 0.1);
          }
        }
        
        .system-time {
          margin: 0 10px;
          color: #a3daff;
          font-size: 14px;
          font-family: monospace;
          letter-spacing: 1px;
          background: rgba(0, 180, 255, 0.05);
          padding: 3px 8px;
          border-radius: 4px;
          border: 1px solid rgba(0, 180, 255, 0.2);
          box-shadow: 0 0 5px rgba(0, 180, 255, 0.1) inset;
          height: 28px;
          display: flex;
          align-items: center;
        }
        
        .notification-badge, .message-badge {
          margin: 0 5px;
          
          .ant-badge-count {
            box-shadow: 0 0 0 1px rgba(0, 180, 255, 0.3);
            background: linear-gradient(135deg, #0067ff, #00e0ff);
          }
        }
      }
      
      .user-info {
        display: flex;
        align-items: center;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 4px;
        transition: all 0.3s;
        
        &:hover {
          background: rgba(0, 140, 255, 0.1);
        }
        
        .user-avatar {
          background: linear-gradient(135deg, #0067ff, #00bbff);
          box-shadow: 0 0 5px rgba(0, 170, 255, 0.6);
        }
        
        .username {
          margin-left: 8px;
          color: #a3daff;
          font-size: 14px;
        }
        
        @media screen and (max-width: 768px) {
          padding: 3px 6px;
          
          .username {
            display: none;
          }
        }
      }
    }
  }
  
  .tech-content {
    padding: 24px;
    overflow: auto;
    background: #060e1b;
    position: relative;
    z-index: 1;
    
    @media screen and (max-width: 1200px) {
      padding: 20px;
    }
    
    @media screen and (max-width: 768px) {
      padding: 16px;
    }
    
    @media screen and (max-width: 576px) {
      padding: 12px;
    }
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 120, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 180, 255, 0.03) 0%, transparent 50%);
      pointer-events: none;
      z-index: -1;
    }
    
    .content-wrapper {
      background: rgba(10, 21, 41, 0.5);
      min-height: 100%;
      border-radius: 8px;
      overflow: hidden;
      position: relative;
      box-shadow: 0 0 20px rgba(0, 20, 40, 0.5);
      
      &::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 8px;
        padding: 1px;
        background: linear-gradient(45deg, transparent, rgba(0, 180, 255, 0.2), transparent);
        -webkit-mask: 
          linear-gradient(#fff 0 0) content-box, 
          linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
      }
      
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 24px;
      
      @media screen and (max-width: 768px) {
        gap: 16px;
      }
      
      @media screen and (max-width: 576px) {
        gap: 12px;
      }
    }
  }
}

@keyframes border-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    text-shadow: 0 0 5px rgba(0, 180, 255, 0.4);
  }
  100% {
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
  }
}

// 添加响应式工具类
.hide-on-mobile {
  @media screen and (max-width: 768px) {
    display: none !important;
  }
}

.show-on-mobile {
  @media screen and (min-width: 769px) {
    display: none !important;
  }
} 